Home:ALL Converter>Type validation within stored procedures - oracle

Type validation within stored procedures - oracle

Ask Time:2022-03-09T05:36:36         Author:user010101

Json Formatter

How does oracle stored procedures handle two different types with the same exact type declaration only that they are stored in two different packages? Example: package1 has type,

Type myType Is Table Of VARCHAR2(40) Index By Binary_Integer;

package2 has type,

Type myType Is Table Of VARCHAR2(40) Index By Binary_Integer;

Now if I use a stored procedure (parameter => myType) stored in package2 and make the call in package1 (input => myType), this throws me an error

PLS-00306: wrong number or types of arguments in call to

Does oracle handle these as different with no internal check for whether both types are 'table of varchar(40)'?

Also what's the best way I can make package1 myType be referencing package2 myType. Subtypes? or is there a way to do it directly?

Thanks

Author:user010101,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/71401717/type-validation-within-stored-procedures-oracle
yy